1. Field of the Invention
The present invention relates to a moving image editing device and method, and a storage medium.
2. Description of the Related Art
Digital video cameras, and digital cameras with a function for shooting moving images are becoming widely available, and opportunity to handle moving image data in ordinary households and businesses is on the rise. Accordingly, an interest in moving image editing, which edits and saves moving image data, is growing, and various moving image editing applications are on the market.
Many moving image editing applications, which are typified by Microsoft's Movie Maker™ and Adobe's Premiere™, provide a function for arbitrarily joining together a portion of a plurality of material data to generate a single moving image data. When the save data is generated from a plurality of material data, such a moving image editing application achieves generation of save data by decoding all material data and re-encoding them into a predetermined moving image format.
However, since, in this edit/save method, all material data have to be decoded and re-encoded, there are problems that it takes much time to generate save data, and image quality is degraded every time editing is repeated.
As techniques to solve these problems, sometimes an edit/save method called a smart rendering is used. The smart rendering is a technique that, when a save format matches the moving image format of the material data, decoding and re-encoding are not performed, but the material data is used directly as save data.
According to this edit/save method, time required for decoding and re-encoding, which accounts for a large percentage of time required for saving the result of editing, can be reduced. In addition, the smart rendering has the advantage that the image quality is not degraded even if the same moving image signal is edited repeatedly because the material data does not have to be re-encoded.
As a moving image editing technique that uses a smart rendering, a technique is described in Japanese Laid-Open Patent Publication (Kokai) No. 2004-104361. This prior art is a technique for applying a smart rendering even if there is material data whose format does not match the save format in a moving image editing device. This prior art will be described below with reference to FIG. 9.
FIG. 9 shows an overview of a moving image editing device that outputs moving image data in an MPEG format.
In FIG. 9, the moving image editing device comprises an AVI importer (decoder) 902 and an MPEG importer 903, which are decoding devices for decoding material data compressed and encoded in an AVI format and in an Moving Picture Experts Group (MPEG) format, respectively.
The moving image editing device also comprises a video editing control program 901, which is a data editing device for arbitrarily joining together a portion or all of a plurality of material data decoded by these importers to generate edited edit data.
The moving image editing device also comprises an MPEG compiler (encoder) 904 for generating and outputting output moving image data in which the material data corresponding to the edit data edited by the video editing program 901 was encoded into a target MPEG format.
In this moving image editing device, when a plurality of partial data that constitute the edit data have the same format as the target MPEG format, the MPEG compiler 904 does not decode the material data corresponding to the partial data, but uses them directly to generate output moving image data.
The above prior art achieves a sophisticated smart rendering with a method that decodes only material data whose format does not match a save format, and converts obtained baseband data into the save format, then joins the material data to the remaining material data. In the above prior art, a format indicates an encoding scheme such as a Motion-JPEG and an MPEG, a bit rate and an image size.
However, in the above prior art, the variation of playback time when the material data is converted into the save format has not been mentioned. Moving image data has a minimum time unit that can edit and save the data. For example, the unit corresponds to a frame for a Motion-JPEG and Group Of Picture (GOP) for an MPEG.
As described above, moving image data has different minimum time units depending on frame rates and encoding schemes. Accordingly, when the material format and the save format are different, the format conversion rounds the playback time of the material data to the minimum time unit in the save format.
For example, a case is considered, in which a 29.97 fps Motion-JPEG serving as material data is converted as a 30 fps Motion-JPEG save data. In this case, since the frame rate of the save data is not an integral multiple of the frame rate of the material data, the material data is rounded to 30 fps by conversion, therefore, a difference in the playback time arises.
Particularly, since when a large number of material data are edited and saved into single save data, the difference arises for each material data, a problem arises, of differences accumulating in the save data, deviating considerably from the original playback time of the material data.